

package com.api.oa.services;

import com.api.oa.exception.BadRequestException;
import com.api.oa.model.entity.YQPatient;
import com.api.oa.model.vo.YQPatientVO;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface YQPatientService {


    Integer add(YQPatient entity) throws BadRequestException;


    void remove(String id);


    Integer update(YQPatient org);


    PageInfo<YQPatient> list(Long pid,Integer pageIndex,Integer pageSize);


    PageInfo<YQPatientVO> page(String idCard, String insCode, String attendType, Integer pageIndex, Integer pageSize);


    YQPatient one(Long id);


    void addBatch(List<YQPatient> entities) throws BadRequestException;


    /**
     * 机构下的患者
     * @param userId
     * @param keyWord
     * @param pageIndex
     * @param pageSize
     * @return
     */
    PageInfo<YQPatientVO> patientByIns(Long userId, String keyWord, Integer pageIndex, Integer pageSize);


    /**
     * 全部的病患
     * @param insCode
     * @return
     */
    List<YQPatientVO> allPatient(String insCode);


    /**
     *
     * @param idCard
     * @param insCode
     * @param attendType
     * @param pageIndex
     * @param pageSize
     * @param res
     */
    void export(String idCard, String insCode, String attendType, Integer pageIndex, Integer pageSize, HttpServletResponse res) throws IOException;
}
